package com.example.trueordare.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.example.trueordare.R;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    private TextView mTV;
    private Button mButtonJoin;
    private Button mButtonWait;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mButtonJoin = findViewById(R.id.button_join);
        mButtonWait = findViewById(R.id.button_wait);
        mButtonJoin.setOnClickListener(this);
        mButtonWait.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.button_join:
                Intent intent = new Intent(MainActivity.this, QuestionActivity.class);
                startActivity(intent);
                break;
            case R.id.button_wait:
                finish();
                break;
            default:
                break;
        }
    }
}